<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle['Lists.Edit.Title']}"></h:outputText>
        </ui:define>
        <ui:define name="menu">
            <div class="block_menu">
                <h:form>
                    <div class="block_menu_left">
                        <h:commandLink action="/index" value="#{bundle['Menu.Main']}"/>
                    </div>
                    <div class="block_menu_left_action">
                        <h:commandLink action="/notes/List" value="#{bundle['Menu.Notes']}"/>
                    </div>
                    
                    <div class="block_menu_right">
                        <h:commandLink action="#{userManagerController.logout()}" value="#{bundle['Menu.Logout']}"/>
                    </div>

                    <div class="block_menu_right">
                            <h:commandLink action="/profile/View" value="Hello #{userManagerController.getAuthenticatedUserName()}"/>
                    </div>                   
                    <h:panelGroup rendered="#{userManagerController.isRoleAdmin() == 1}">
                        <div class="block_menu_left">
                            <h:commandLink action="/users/List" value="#{bundle['Menu.UsersManagement']}"/>
                        </div>
                    </h:panelGroup>
                </h:form>
            </div>
        </ui:define>
        <ui:define name="line">
            <h:outputText value=""/>
        </ui:define>
        <ui:define name="body">
            <h:messages errorClass="error" infoClass="info" />
            <center>

    <div style="padding-top: 65px;">
        <h:form>
            <h:panelGrid columns="2" columnClasses="registrationFormFirst,registrationFormSecond" >
                
                <h:outputLabel value="#{bundle['Lists.Edit.Label.Name']}"
                               style="font: 16pt 'Segoe WP';  color: #707070;"/> 
                
                <h:inputText maxlength="15" required="true"
                    style="width: 180px; height: 30px; padding-left: 5px; font: 12pt 'Segoe WP'; color: #707070;
                        background-color: #ffffff; border: 2px solid #707070;" 
                        value="#{listController.name}" 
                        title="#{bundle['Lists.Edit.Title.Name']}"  
                        requiredMessage="#{bundle['Lists.Edit.RM.Name']}"/>
            </h:panelGrid>
            
            <h:panelGrid columns="2" columnClasses="registrationFormFirstButtonReset,registrationFormSecondButtonRegistration" >
                <h:commandLink/>
                <h:commandButton type="submit" style="width: 190px; height: 45px; font: 16pt 'Segoe WP'; font-weight: bold; 
                                         color: #505050; background-color: #f0f0f0; border: 3px solid #505050;" 
                                 value="#{bundle['Lists.Edit.Update']}"
                                 action="#{listController.update}"/>
            </h:panelGrid>
            
        </h:form>
        </div>           
                
            </center>
        </ui:define>
    </ui:composition>

</html>